<template>
  <div>
    <div class="empty-box"></div>
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide class="swiper-item" v-for="item in list" :key="item.id">
        <img :src="item.imgUrl" alt="">
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>
<script>
export default {
  name: "HomeSwiper",
  props: {
    list: Array
  },
  data() {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination'
        },
        loop: true,
        autoplay:true
      }
    }
  }
}
</script>
<style lang="scss" scoped>
  .empty-box{
    height: 100px;
  }
  .swiper-item {
    width: 100%;
    img{
      width: 100%;
    }
  }
</style>
